<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Context &mdash; Selenium-Driverless 1.9.3.1 documentation</title>
      <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" />
      <link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="../../_static/jquery.js?v=5d32c60e"></script>
        <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
        <script src="../../_static/documentation_options.js?v=58554080"></script>
        <script src="../../_static/doctools.js?v=888ff710"></script>
        <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="Input" href="../Input/" />
    <link rel="prev" title="ChromeOptions" href="../ChromeOptions/" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../../" class="icon icon-home">
            Selenium-Driverless
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../By/">By Element Locator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Chrome/">webdriver.Chrome</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ChromeOptions/">ChromeOptions</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Context</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#selenium_driverless.types.context.Context"><code class="docutils literal notranslate"><span class="pre">Context</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_download_behaviour"><code class="docutils literal notranslate"><span class="pre">Context.set_download_behaviour()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.downloads_dir"><code class="docutils literal notranslate"><span class="pre">Context.downloads_dir</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.wait_download"><code class="docutils literal notranslate"><span class="pre">Context.wait_download()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get"><code class="docutils literal notranslate"><span class="pre">Context.get()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.title"><code class="docutils literal notranslate"><span class="pre">Context.title</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.current_pointer"><code class="docutils literal notranslate"><span class="pre">Context.current_pointer</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.send_keys"><code class="docutils literal notranslate"><span class="pre">Context.send_keys()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.execute_raw_script"><code class="docutils literal notranslate"><span class="pre">Context.execute_raw_script()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.execute_script"><code class="docutils literal notranslate"><span class="pre">Context.execute_script()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.execute_async_script"><code class="docutils literal notranslate"><span class="pre">Context.execute_async_script()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.eval_async"><code class="docutils literal notranslate"><span class="pre">Context.eval_async()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.current_url"><code class="docutils literal notranslate"><span class="pre">Context.current_url</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.page_source"><code class="docutils literal notranslate"><span class="pre">Context.page_source</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.close"><code class="docutils literal notranslate"><span class="pre">Context.close()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.quit"><code class="docutils literal notranslate"><span class="pre">Context.quit()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.current_window_handle"><code class="docutils literal notranslate"><span class="pre">Context.current_window_handle</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.window_handles"><code class="docutils literal notranslate"><span class="pre">Context.window_handles</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.new_window"><code class="docutils literal notranslate"><span class="pre">Context.new_window()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.maximize_window"><code class="docutils literal notranslate"><span class="pre">Context.maximize_window()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.fullscreen_window"><code class="docutils literal notranslate"><span class="pre">Context.fullscreen_window()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.minimize_window"><code class="docutils literal notranslate"><span class="pre">Context.minimize_window()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.print_page"><code class="docutils literal notranslate"><span class="pre">Context.print_page()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.switch_to"><code class="docutils literal notranslate"><span class="pre">Context.switch_to</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.back"><code class="docutils literal notranslate"><span class="pre">Context.back()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.forward"><code class="docutils literal notranslate"><span class="pre">Context.forward()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.refresh"><code class="docutils literal notranslate"><span class="pre">Context.refresh()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_cookies"><code class="docutils literal notranslate"><span class="pre">Context.get_cookies()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_cookie"><code class="docutils literal notranslate"><span class="pre">Context.get_cookie()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.delete_cookie"><code class="docutils literal notranslate"><span class="pre">Context.delete_cookie()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.delete_all_cookies"><code class="docutils literal notranslate"><span class="pre">Context.delete_all_cookies()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.add_cookie"><code class="docutils literal notranslate"><span class="pre">Context.add_cookie()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.find_element"><code class="docutils literal notranslate"><span class="pre">Context.find_element()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.find_elements"><code class="docutils literal notranslate"><span class="pre">Context.find_elements()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.search_elements"><code class="docutils literal notranslate"><span class="pre">Context.search_elements()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_screenshot_as_file"><code class="docutils literal notranslate"><span class="pre">Context.get_screenshot_as_file()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.save_screenshot"><code class="docutils literal notranslate"><span class="pre">Context.save_screenshot()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_screenshot_as_png"><code class="docutils literal notranslate"><span class="pre">Context.get_screenshot_as_png()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.snapshot"><code class="docutils literal notranslate"><span class="pre">Context.snapshot()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.save_snapshot"><code class="docutils literal notranslate"><span class="pre">Context.save_snapshot()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_window_size"><code class="docutils literal notranslate"><span class="pre">Context.set_window_size()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_window_size"><code class="docutils literal notranslate"><span class="pre">Context.get_window_size()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_window_position"><code class="docutils literal notranslate"><span class="pre">Context.set_window_position()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_window_position"><code class="docutils literal notranslate"><span class="pre">Context.get_window_position()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_window_rect"><code class="docutils literal notranslate"><span class="pre">Context.get_window_rect()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_window_rect"><code class="docutils literal notranslate"><span class="pre">Context.set_window_rect()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_network_conditions"><code class="docutils literal notranslate"><span class="pre">Context.get_network_conditions()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_network_conditions"><code class="docutils literal notranslate"><span class="pre">Context.set_network_conditions()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.delete_network_conditions"><code class="docutils literal notranslate"><span class="pre">Context.delete_network_conditions()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_permissions"><code class="docutils literal notranslate"><span class="pre">Context.set_permissions()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.wait_for_cdp"><code class="docutils literal notranslate"><span class="pre">Context.wait_for_cdp()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.add_cdp_listener"><code class="docutils literal notranslate"><span class="pre">Context.add_cdp_listener()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.remove_cdp_listener"><code class="docutils literal notranslate"><span class="pre">Context.remove_cdp_listener()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_cdp_event_iter"><code class="docutils literal notranslate"><span class="pre">Context.get_cdp_event_iter()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.execute_cdp_cmd"><code class="docutils literal notranslate"><span class="pre">Context.execute_cdp_cmd()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.fetch"><code class="docutils literal notranslate"><span class="pre">Context.fetch()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.xhr"><code class="docutils literal notranslate"><span class="pre">Context.xhr()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_sinks"><code class="docutils literal notranslate"><span class="pre">Context.get_sinks()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.get_issue_message"><code class="docutils literal notranslate"><span class="pre">Context.get_issue_message()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.set_sink_to_use"><code class="docutils literal notranslate"><span class="pre">Context.set_sink_to_use()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.start_desktop_mirroring"><code class="docutils literal notranslate"><span class="pre">Context.start_desktop_mirroring()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.start_tab_mirroring"><code class="docutils literal notranslate"><span class="pre">Context.start_tab_mirroring()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#selenium_driverless.types.context.Context.stop_casting"><code class="docutils literal notranslate"><span class="pre">Context.stop_casting()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Input/">Input</a></li>
<li class="toctree-l1"><a class="reference internal" href="../RequestInterception/">Request-Interception</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Target/">Target</a></li>
<li class="toctree-l1"><a class="reference internal" href="../WebELement/">WebElement</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Selenium-Driverless</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Context</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../_sources/api/Context.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="context">
<h1>Context<a class="headerlink" href="#context" title="Link to this heading"></a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">selenium_driverless.types.context.</span></span><span class="sig-name descname"><span class="pre">Context</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">base_target</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">driver</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loop</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">is_incognito</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_ws_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1048576</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context" title="Link to this definition"></a></dt>
<dd><p>Allows you to drive the browser without chromedriver.</p>
<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_download_behaviour">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_download_behaviour</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">behavior</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_download_behaviour"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_download_behaviour" title="Link to this definition"></a></dt>
<dd><p>set the download behaviour</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>behavior</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Literal</span></code>[<code class="docutils literal notranslate"><span class="pre">'deny'</span></code>, <code class="docutils literal notranslate"><span class="pre">'allow'</span></code>, <code class="docutils literal notranslate"><span class="pre">'allowAndName'</span></code>, <code class="docutils literal notranslate"><span class="pre">'default'</span></code>]</span>) – the behaviour to set the downloading to</p></li>
<li><p><strong>path</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – the path to the default download directory</p></li>
</ul>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>setting <code class="docutils literal notranslate"><span class="pre">behaviour=allow</span></code> instead of <code class="docutils literal notranslate"><span class="pre">allowAndName</span></code> can cause some bugs</p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.downloads_dir">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">downloads_dir</span></span><a class="headerlink" href="#selenium_driverless.types.context.Context.downloads_dir" title="Link to this definition"></a></dt>
<dd><p>the current downloads directory</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.wait_download">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">wait_download</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">30</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.wait_download"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.wait_download" title="Link to this definition"></a></dt>
<dd><p>wait for a download on the current tab</p>
<p>returns something like</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
    <span class="s2">&quot;frameId&quot;</span><span class="p">:</span> <span class="s2">&quot;2D543B5E8B14945B280C537A4882A695&quot;</span><span class="p">,</span>
    <span class="s2">&quot;guid&quot;</span><span class="p">:</span> <span class="s2">&quot;c91df4d5-9b45-4962-84df-3749bd3f926d&quot;</span><span class="p">,</span>
    <span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&quot;</span><span class="p">,</span>
    <span class="s2">&quot;suggestedFilename&quot;</span><span class="p">:</span> <span class="s2">&quot;dummy.pdf&quot;</span><span class="p">,</span>

    <span class="c1"># only if options.downloads_dir specified</span>
    <span class="s2">&quot;guid_file&quot;</span><span class="p">:</span> <span class="s2">&quot;D:\System\AppData\PyCharm\scratches\downloads\c91df4d5-9b45-4962-84df-3749bd3f926d&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timeout</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></span>) – time in seconds to wait for a download</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>downloads from iframes not supported yet</p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">referrer</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_load</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">30</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get" title="Link to this definition"></a></dt>
<dd><p>Loads a web page in the current Target</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>url</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – the url to load.</p></li>
<li><p><strong>referrer</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – the referrer to load the page with</p></li>
<li><p><strong>wait_load</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – whether to wait for the webpage to load</p></li>
<li><p><strong>timeout</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></span>) – the maximum time in seconds for waiting on load</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
<p>returns the same as <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.wait_download" title="selenium_driverless.types.target.Target.wait_download"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.wait_download</span></code></a> if the url initiates a download</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.title">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">title</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#selenium_driverless.types.context.Context.title" title="Link to this definition"></a></dt>
<dd><p>Returns the title of the current target</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.current_pointer">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">current_pointer</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="../Input/#selenium_driverless.input.pointer.Pointer" title="selenium_driverless.input.pointer.Pointer"><span class="pre">Pointer</span></a></em><a class="headerlink" href="#selenium_driverless.types.context.Context.current_pointer" title="Link to this definition"></a></dt>
<dd><p>the <a class="reference internal" href="../Input/#selenium_driverless.input.pointer.Pointer" title="selenium_driverless.input.pointer.Pointer"><code class="xref py py-class docutils literal notranslate"><span class="pre">Pointer</span></code></a> for the current target</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.send_keys">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">send_keys</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.send_keys"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.send_keys" title="Link to this definition"></a></dt>
<dd><p>send text &amp; keys to the current target</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>text</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – the text to send</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.execute_raw_script">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">execute_raw_script</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">script</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">await_res</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">serialization</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_depth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">execution_context_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unique_context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.execute_raw_script"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.execute_raw_script" title="Link to this definition"></a></dt>
<dd><p>example:
script= “function(…arguments){obj.click()}”
“const obj” will be the Object according to obj_id
this is by default globalThis (=&gt; window)</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.execute_script">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">execute_script</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">script</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_depth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">serialization</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">execution_context_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unique_context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.execute_script"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.execute_script" title="Link to this definition"></a></dt>
<dd><p>executes JavaScript synchronously on <code class="docutils literal notranslate"><span class="pre">GlobalThis</span></code> such as</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="k">return</span><span class="w"> </span><span class="nb">document</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">this</span></code> and <code class="docutils literal notranslate"><span class="pre">obj</span></code> refers to <code class="docutils literal notranslate"><span class="pre">globalThis</span></code> (=&gt; window) here</p>
<p>see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.execute_raw_script" title="selenium_driverless.types.target.Target.execute_raw_script"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.execute_raw_script</span></code></a> for argument descriptions</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.execute_async_script">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">execute_async_script</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">script</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_depth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">serialization</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">execution_context_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unique_context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.execute_async_script"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.execute_async_script" title="Link to this definition"></a></dt>
<dd><p>executes JavaScript asynchronously on <code class="docutils literal notranslate"><span class="pre">GlobalThis</span></code> such as</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>using execute_async_script is not recommended as it doesn’t handle exceptions correctly.
Use <a class="reference internal" href="../Chrome/#selenium_driverless.webdriver.Chrome.eval_async" title="selenium_driverless.webdriver.Chrome.eval_async"><code class="xref py py-func docutils literal notranslate"><span class="pre">Chrome.eval_async</span></code></a></p>
</div>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="nx">resolve</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">arguments</span><span class="p">[</span><span class="nx">arguments</span><span class="p">.</span><span class="nx">length</span><span class="o">-</span><span class="mf">1</span><span class="p">]</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">this</span></code> refers to <code class="docutils literal notranslate"><span class="pre">globalThis</span></code> (=&gt; window)</p>
<p>see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.execute_raw_script" title="selenium_driverless.types.target.Target.execute_raw_script"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.execute_raw_script</span></code></a> for argument descriptions</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.eval_async">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">eval_async</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">script</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_depth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">serialization</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">execution_context_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unique_context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.eval_async"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.eval_async" title="Link to this definition"></a></dt>
<dd><p>executes JavaScript asynchronously on <code class="docutils literal notranslate"><span class="pre">GlobalThis</span></code> such as</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="nx">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">await</span><span class="w"> </span><span class="nx">fetch</span><span class="p">(</span><span class="s2">&quot;https://httpbin.org/get&quot;</span><span class="p">);</span>
<span class="c1">// mind CORS!</span>
<span class="nx">json</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">await</span><span class="w"> </span><span class="nx">res</span><span class="p">.</span><span class="nx">json</span><span class="p">()</span>
<span class="k">return</span><span class="w"> </span><span class="nx">json</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">this</span></code> refers to <code class="docutils literal notranslate"><span class="pre">globalThis</span></code> (=&gt; window)</p>
<p>see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.execute_raw_script" title="selenium_driverless.types.target.Target.execute_raw_script"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.execute_raw_script</span></code></a> for argument descriptions</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.current_url">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">current_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#selenium_driverless.types.context.Context.current_url" title="Link to this definition"></a></dt>
<dd><p>Gets the URL of the current page.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">current_url</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.page_source">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">page_source</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#selenium_driverless.types.context.Context.page_source" title="Link to this definition"></a></dt>
<dd><p>Gets the docs_source of the current page.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">page_source</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.close">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">close</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.close"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.close" title="Link to this definition"></a></dt>
<dd><p>Closes the current window.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.quit">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">quit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">30</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start_monotonic</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.quit"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.quit" title="Link to this definition"></a></dt>
<dd><p>Quits the target and closes every associated window.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">quit</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.current_window_handle">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">current_window_handle</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#selenium_driverless.types.context.Context.current_window_handle" title="Link to this definition"></a></dt>
<dd><p>Returns the current target_id</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.window_handles">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">window_handles</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="../Target/#selenium_driverless.types.target.TargetInfo" title="selenium_driverless.types.target.TargetInfo"><span class="pre">TargetInfo</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#selenium_driverless.types.context.Context.window_handles" title="Link to this definition"></a></dt>
<dd><p>Returns the handles of all windows within the current session.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">window_handles</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.new_window">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">new_window</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">type_hint</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'tab'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">focus</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">background</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.new_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.new_window" title="Link to this definition"></a></dt>
<dd><p>creates a new tab or window</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>type_hint</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Literal</span></code>[<code class="docutils literal notranslate"><span class="pre">'tab'</span></code>, <code class="docutils literal notranslate"><span class="pre">'window'</span></code>]</span>) – what kind of target to create</p></li>
<li><p><strong>url</strong> – url to start the target at</p></li>
<li><p><strong>activate</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – whether to bring the target to the front</p></li>
<li><p><strong>focus</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – whether to emulate focus on the target</p></li>
<li><p><strong>background</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – whether to start the target in the background</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><a class="reference internal" href="../Target/#selenium_driverless.types.target.Target" title="selenium_driverless.types.target.Target"><code class="xref py py-class docutils literal notranslate"><span class="pre">Target</span></code></a></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.maximize_window">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">maximize_window</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.maximize_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.maximize_window" title="Link to this definition"></a></dt>
<dd><p>Maximizes the current window that webdriver is using.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.fullscreen_window">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fullscreen_window</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.fullscreen_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.fullscreen_window" title="Link to this definition"></a></dt>
<dd><p>Invokes the window manager-specific ‘full screen’ operation.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.minimize_window">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">minimize_window</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.minimize_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.minimize_window" title="Link to this definition"></a></dt>
<dd><p>Invokes the window manager-specific ‘minimize’ operation.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.print_page">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">print_page</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.print_page"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.print_page" title="Link to this definition"></a></dt>
<dd><p>Takes PDF of the current page.</p>
<p>The target makes the best effort to return a PDF based on the
provided parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.switch_to">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">switch_to</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="../Chrome/#selenium_driverless.scripts.switch_to.SwitchTo" title="selenium_driverless.scripts.switch_to.SwitchTo"><span class="pre">SwitchTo</span></a></em><a class="headerlink" href="#selenium_driverless.types.context.Context.switch_to" title="Link to this definition"></a></dt>
<dd><dl class="field-list">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>SwitchTo: an object containing all options to switch focus into</p></li>
</ul>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">element</span> <span class="o">=</span> <span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">active_element</span>
<span class="n">alert</span> <span class="o">=</span> <span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">alert</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">default_content</span><span class="p">()</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">frame</span><span class="p">(</span><span class="s1">&#39;frame_name&#39;</span><span class="p">)</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">frame</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">frame</span><span class="p">(</span><span class="n">target</span><span class="o">.</span><span class="n">find_elements</span><span class="p">(</span><span class="n">By</span><span class="o">.</span><span class="n">TAG_NAME</span><span class="p">,</span> <span class="s2">&quot;iframe&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">parent_frame</span><span class="p">()</span>
<span class="n">target</span><span class="o">.</span><span class="n">switch_to</span><span class="o">.</span><span class="n">window</span><span class="p">(</span><span class="s1">&#39;main&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.back">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">back</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.back"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.back" title="Link to this definition"></a></dt>
<dd><p>Goes one step backward in the browser history.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">back</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.forward">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">forward</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.forward"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.forward" title="Link to this definition"></a></dt>
<dd><p>Goes one step forward in the browser history.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">forward</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.refresh">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">refresh</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.refresh"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.refresh" title="Link to this definition"></a></dt>
<dd><p>Refreshes the current page.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">refresh</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_cookies">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_cookies</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_cookies"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_cookies" title="Link to this definition"></a></dt>
<dd><p>Returns a set of dictionaries, corresponding to cookies visible in
the current target.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>]</span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_cookie">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_cookie</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_cookie"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_cookie" title="Link to this definition"></a></dt>
<dd><p>Get a single cookie by name. Returns the cookie if found, None if
not.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">get_cookie</span><span class="p">(</span><span class="s1">&#39;my_cookie&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code>]</span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.delete_cookie">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">delete_cookie</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">domain</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.delete_cookie"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.delete_cookie" title="Link to this definition"></a></dt>
<dd><p>Deletes a single cookie with the given name.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.delete_all_cookies">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">delete_all_cookies</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.delete_all_cookies"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.delete_all_cookies" title="Link to this definition"></a></dt>
<dd><p>Delete all cookies in the scope of the session.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">delete_all_cookies</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.add_cookie">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">add_cookie</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cookie_dict</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.add_cookie"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.add_cookie" title="Link to this definition"></a></dt>
<dd><p>Adds a cookie to your current session.</p>
<dl class="field-list">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>cookie_dict</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span>) – A dictionary object, with required keys - “name” and “value”;
optional keys - “path”, “domain”, “secure”, “httpOnly”, “expiry”, “sameSite”</p>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">add_cookie</span><span class="p">({</span><span class="s1">&#39;name&#39;</span> <span class="p">:</span> <span class="s1">&#39;foo&#39;</span><span class="p">,</span> <span class="s1">&#39;value&#39;</span> <span class="p">:</span> <span class="s1">&#39;bar&#39;</span><span class="p">})</span>
<span class="n">target</span><span class="o">.</span><span class="n">add_cookie</span><span class="p">({</span><span class="s1">&#39;name&#39;</span> <span class="p">:</span> <span class="s1">&#39;foo&#39;</span><span class="p">,</span> <span class="s1">&#39;value&#39;</span> <span class="p">:</span> <span class="s1">&#39;bar&#39;</span><span class="p">,</span> <span class="s1">&#39;path&#39;</span> <span class="p">:</span> <span class="s1">&#39;/&#39;</span><span class="p">})</span>
<span class="n">target</span><span class="o">.</span><span class="n">add_cookie</span><span class="p">({</span><span class="s1">&#39;name&#39;</span> <span class="p">:</span> <span class="s1">&#39;foo&#39;</span><span class="p">,</span> <span class="s1">&#39;value&#39;</span> <span class="p">:</span> <span class="s1">&#39;bar&#39;</span><span class="p">,</span> <span class="s1">&#39;path&#39;</span> <span class="p">:</span> <span class="s1">&#39;/&#39;</span><span class="p">,</span> <span class="s1">&#39;secure&#39;</span> <span class="p">:</span> <span class="kc">True</span><span class="p">})</span>
<span class="n">target</span><span class="o">.</span><span class="n">add_cookie</span><span class="p">({</span><span class="s1">&#39;name&#39;</span> <span class="p">:</span> <span class="s1">&#39;foo&#39;</span><span class="p">,</span> <span class="s1">&#39;value&#39;</span> <span class="p">:</span> <span class="s1">&#39;bar&#39;</span><span class="p">,</span> <span class="s1">&#39;sameSite&#39;</span> <span class="p">:</span> <span class="s1">&#39;Strict&#39;</span><span class="p">})</span>
</pre></div>
</div>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.find_element">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">find_element</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">by</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.find_element"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.find_element" title="Link to this definition"></a></dt>
<dd><p>find an element in the current target</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>by</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – one of the locators at <a class="reference internal" href="../By/#selenium_driverless.types.by.By" title="selenium_driverless.types.by.By"><code class="xref py py-func docutils literal notranslate"><span class="pre">By</span></code></a></p></li>
<li><p><strong>value</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – the actual query to find the element by</p></li>
<li><p><strong>timeout</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>]</span>) – how long to wait for the element to exist</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><a class="reference internal" href="../WebELement/#selenium_driverless.types.webelement.WebElement" title="selenium_driverless.types.webelement.WebElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebElement</span></code></a></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.find_elements">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">find_elements</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">by</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.find_elements"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.find_elements" title="Link to this definition"></a></dt>
<dd><p>find multiple elements in the current target</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>by</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – one of the locators at <a class="reference internal" href="../By/#selenium_driverless.types.by.By" title="selenium_driverless.types.by.By"><code class="xref py py-func docutils literal notranslate"><span class="pre">By</span></code></a></p></li>
<li><p><strong>value</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – the actual query to find the elements by</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<a class="reference internal" href="../WebELement/#selenium_driverless.types.webelement.WebElement" title="selenium_driverless.types.webelement.WebElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebElement</span></code></a>]</span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.search_elements">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">search_elements</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.search_elements"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.search_elements" title="Link to this definition"></a></dt>
<dd><p>query:str | Plain text or query selector or XPath search query.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<a class="reference internal" href="../WebELement/#selenium_driverless.types.webelement.WebElement" title="selenium_driverless.types.webelement.WebElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebElement</span></code></a>]</span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_screenshot_as_file">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_screenshot_as_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_screenshot_as_file"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_screenshot_as_file" title="Link to this definition"></a></dt>
<dd><p>Saves a screenshot of the current window to a PNG image file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>filename</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – The full path you wish to save your screenshot to. This
should end with a <cite>.png</cite> extension.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.save_screenshot">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">save_screenshot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.save_screenshot"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.save_screenshot" title="Link to this definition"></a></dt>
<dd><p>alias to :func: <cite>driver.get_screenshot_as_file &lt;selenium_driverless.webdriver.Chrome.get_screenshot_as_file&gt;</cite></p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_screenshot_as_png">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_screenshot_as_png</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_screenshot_as_png"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_screenshot_as_png" title="Link to this definition"></a></dt>
<dd><p>Gets the screenshot of the current window as a binary data.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">get_screenshot_as_png</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.snapshot">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">snapshot</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.snapshot"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.snapshot" title="Link to this definition"></a></dt>
<dd><p>gets the current snapshot as mhtml</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.save_snapshot">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">save_snapshot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.save_snapshot"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.save_snapshot" title="Link to this definition"></a></dt>
<dd><p>Saves a snapshot of the current window to a MHTML file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>filename</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – The full path you wish to save your snapshot to. This
should end with a <code class="docutils literal notranslate"><span class="pre">.mhtml</span></code> extension.</p>
</dd>
</dl>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="k">await</span> <span class="n">driver</span><span class="o">.</span><span class="n">get_snapshot</span><span class="p">(</span><span class="s1">&#39;snapshot.mhtml&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_window_size">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_window_size</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windowHandle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'current'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_window_size"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_window_size" title="Link to this definition"></a></dt>
<dd><p>Sets the width and height of the current window. (window.resizeTo)</p>
<dl class="field-list">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>width: the width in pixels to set the window to</p></li>
<li><p>height: the height in pixels to set the window to</p></li>
</ul>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">set_window_size</span><span class="p">(</span><span class="mi">800</span><span class="p">,</span><span class="mi">600</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_window_size">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_window_size</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_window_size"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_window_size" title="Link to this definition"></a></dt>
<dd><p>Gets the width and height of the current window.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_window_position">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_window_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windowHandle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'current'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_window_position"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_window_position" title="Link to this definition"></a></dt>
<dd><p>Sets the x,y position of the current window. (window.moveTo)</p>
<dl class="field-list">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>x: the x-coordinate in pixels to set the window position</p></li>
<li><p>y: the y-coordinate in pixels to set the window position</p></li>
</ul>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">set_window_position</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_window_position">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_window_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">windowHandle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'current'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_window_position"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_window_position" title="Link to this definition"></a></dt>
<dd><p>Gets the x,y position of the current window.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">get_window_position</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_window_rect">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_window_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_window_rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_window_rect" title="Link to this definition"></a></dt>
<dd><p>Gets the x, y coordinates of the window as well as height and width
of the current window.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">get_window_rect</span><span class="p">()</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_window_rect">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_window_rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_window_rect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_window_rect" title="Link to this definition"></a></dt>
<dd><p>Sets the x, y coordinates of the window as well as height and width
of the current window. This method is only supported for W3C compatible
browsers; other browsers should use <cite>set_window_position</cite> and
<cite>set_window_size</cite>.</p>
<dl class="field-list">
<dt class="field-odd">Usage<span class="colon">:</span></dt>
<dd class="field-odd"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">set_window_rect</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="n">target</span><span class="o">.</span><span class="n">set_window_rect</span><span class="p">(</span><span class="n">width</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mi">200</span><span class="p">)</span>
<span class="n">target</span><span class="o">.</span><span class="n">set_window_rect</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mi">200</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_network_conditions">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_network_conditions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_network_conditions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_network_conditions" title="Link to this definition"></a></dt>
<dd><p>Gets Chromium network emulation settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dict. For example:
{‘latency’: 4, ‘download_throughput’: 2, ‘upload_throughput’: 2,
‘offline’: False}</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_network_conditions">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_network_conditions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">offline</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">latency</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">download_throughput</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">upload_throughput</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">connection_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_network_conditions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_network_conditions" title="Link to this definition"></a></dt>
<dd><p>Sets Chromium network emulation settings.</p>
<dl class="field-list">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>network_conditions: A dict with conditions specification.</p></li>
</ul>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">set_network_conditions</span><span class="p">(</span>
    <span class="n">offline</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
    <span class="n">latency</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span>  <span class="c1"># additional latency (ms)</span>
    <span class="n">download_throughput</span><span class="o">=</span><span class="mi">500</span> <span class="o">*</span> <span class="mi">1024</span><span class="p">,</span>  <span class="c1"># maximal throughput</span>
    <span class="n">upload_throughput</span><span class="o">=</span><span class="mi">500</span> <span class="o">*</span> <span class="mi">1024</span><span class="p">,</span>  <span class="c1"># maximal throughput</span>
    <span class="n">connection_type</span><span class="o">=</span><span class="s2">&quot;wifi&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>Note: ‘throughput’ can be used to set both (for download and upload).</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.delete_network_conditions">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">delete_network_conditions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.delete_network_conditions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.delete_network_conditions" title="Link to this definition"></a></dt>
<dd><p>Resets Chromium network emulation settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_permissions">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_permissions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">origin</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_permissions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_permissions" title="Link to this definition"></a></dt>
<dd><p>Sets Applicable Permission.</p>
<dl class="field-list">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>name: The item to set the permission on.</p></li>
<li><p>value: The value to set on the item</p></li>
</ul>
</dd>
<dt class="field-even">Usage<span class="colon">:</span></dt>
<dd class="field-even"><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span><span class="o">.</span><span class="n">set_permissions</span><span class="p">(</span><span class="s1">&#39;clipboard-read&#39;</span><span class="p">,</span> <span class="s1">&#39;denied&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.wait_for_cdp">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">wait_for_cdp</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.wait_for_cdp"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.wait_for_cdp" title="Link to this definition"></a></dt>
<dd><p>wait for an event on the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.wait_for_cdp" title="selenium_driverless.types.target.Target.wait_for_cdp"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.wait_for_cdp</span></code></a> for reference</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.add_cdp_listener">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">add_cdp_listener</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">callback</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.add_cdp_listener"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.add_cdp_listener" title="Link to this definition"></a></dt>
<dd><p>add a listener for a CDP event on the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.add_cdp_listener" title="selenium_driverless.types.target.Target.add_cdp_listener"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.add_cdp_listener</span></code></a> for reference</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.remove_cdp_listener">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">remove_cdp_listener</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">callback</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.remove_cdp_listener"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.remove_cdp_listener" title="Link to this definition"></a></dt>
<dd><p>remove a listener for a CDP event on the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.remove_cdp_listener" title="selenium_driverless.types.target.Target.remove_cdp_listener"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.remove_cdp_listener</span></code></a> for reference</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_cdp_event_iter">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_cdp_event_iter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_cdp_event_iter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_cdp_event_iter" title="Link to this definition"></a></dt>
<dd><p>iterate over CDP events on the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.get_cdp_event_iter" title="selenium_driverless.types.target.Target.get_cdp_event_iter"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.get_cdp_event_iter</span></code></a> for reference</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">AsyncIterable</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>]</span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.execute_cdp_cmd">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">execute_cdp_cmd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cmd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmd_args</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.execute_cdp_cmd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.execute_cdp_cmd" title="Link to this definition"></a></dt>
<dd><p>Execute Chrome Devtools Protocol command on the current target
executes it on <a class="reference internal" href="../Target/#selenium_driverless.types.base_target.BaseTarget" title="selenium_driverless.types.base_target.BaseTarget"><code class="xref py py-class docutils literal notranslate"><span class="pre">Target.execute_cdp_cmd</span></code></a>
if <code class="docutils literal notranslate"><span class="pre">message:'Not</span> <span class="pre">allowed'</span></code> received
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.execute_cdp_cmd" title="selenium_driverless.types.target.Target.execute_cdp_cmd"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.execute_cdp_cmd</span></code></a> for reference</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.fetch">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fetch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.fetch"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.fetch" title="Link to this definition"></a></dt>
<dd><p>executes a JS <code class="docutils literal notranslate"><span class="pre">fetch</span></code> request within the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.fetch" title="selenium_driverless.types.target.Target.fetch"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.fetch</span></code></a> for reference</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.xhr">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">xhr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.xhr"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.xhr" title="Link to this definition"></a></dt>
<dd><p>executes a JS <code class="docutils literal notranslate"><span class="pre">XMLHttpRequest</span></code> request within the current target
see <a class="reference internal" href="../Target/#selenium_driverless.types.target.Target.fetch" title="selenium_driverless.types.target.Target.fetch"><code class="xref py py-func docutils literal notranslate"><span class="pre">Target.fetch</span></code></a> for reference</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_sinks">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_sinks</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_sinks"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_sinks" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A list of sinks available for Cast.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.get_issue_message">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_issue_message</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.get_issue_message"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.get_issue_message" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>An error message when there is any issue in a Cast session.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.set_sink_to_use">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_sink_to_use</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sink_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.set_sink_to_use"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.set_sink_to_use" title="Link to this definition"></a></dt>
<dd><p>Sets a specific sink, using its name, as a Cast session receiver
target.</p>
<dl class="field-list simple">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>sink_name: Name of the sink to use as the target.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.start_desktop_mirroring">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">start_desktop_mirroring</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sink_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.start_desktop_mirroring"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.start_desktop_mirroring" title="Link to this definition"></a></dt>
<dd><p>Starts a desktop mirroring session on a specific receiver target.</p>
<dl class="field-list simple">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>sink_name: Name of the sink to use as the target.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.start_tab_mirroring">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">start_tab_mirroring</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sink_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.start_tab_mirroring"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.start_tab_mirroring" title="Link to this definition"></a></dt>
<dd><p>Starts a tab mirroring session on a specific receiver target.</p>
<dl class="field-list simple">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>sink_name: Name of the sink to use as the target.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="selenium_driverless.types.context.Context.stop_casting">
<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">stop_casting</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sink_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/selenium_driverless/types/context/#Context.stop_casting"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#selenium_driverless.types.context.Context.stop_casting" title="Link to this definition"></a></dt>
<dd><p>Stops the existing Cast session on a specific receiver target.</p>
<dl class="field-list simple">
<dt class="field-odd">Args<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>sink_name: Name of the sink to stop the Cast session.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></span></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../ChromeOptions/" class="btn btn-neutral float-left" title="ChromeOptions" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../Input/" class="btn btn-neutral float-right" title="Input" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2024, Aurin Aegerter (aka Steve, kaliiiiiiiiii).</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>